<!DOCTYPE html>
<html lang="en">

{% load dajaxice_templatetags %}

<head>
    <title>{% block title %}Next-Lobster Achievementy{% endblock %}</title>
    <meta charset="UTF-8" />
    <meta name="description" content="{% block description %}Stránka pre vaše achievementy{% endblock %}" />
    <meta name="keywords" content="{% block keywords %}achievement, achieve, goals, úspech{% endblock %}" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <script type="text/javascript" src="{{ STATIC_URL }}js/jquery.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}js/jquery.tablesorter.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}js/bootstrap.min.js"></script>    
    <script type="text/javascript" src="{{ STATIC_URL }}js/prettify.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}js/javascript.js"></script>
    
    {% dajaxice_js_import %}
    
    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}styles/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}styles/style.css">
    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}styles/prettify.css">
    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}styles/bootstrap-responsive.css">
</head>

{% load autofill %}
{% load messages %}

<body>
    <div class="navbar navbar-fixed-top">
        <div class="navbar-inner">
            <div class="container">
            <div class="row">
                <a class="brand" href="{% url main_page %}"><i class="icon-white icon-home" style="margin-top:5px;"></i> Domov</a>
                <!--<div class="nav-collapse">-->
                    <ul class="nav">
                        <li>
                            <a class="active" href="{% url achievements_search %}"><i class="icon-white icon-heart"></i> Achievementy</a>
                        </li>
                        
                        <li>
                            <a href="{% url show_users_page %}"><i class="icon-white icon-th-list"></i> Používatelia</a>
                        </li>
                        
                        <form class="navbar-search pull-left" style="margin-left: 10px;" method="GET" action="/list/">
                            <div class="input-append">
                                <input  autocomplete="off" name="q" type="text" class="span2 search-query" placeholder="Hľadať achievement..." data-provide="typeahead" data-items="4" data-source='[{% get_autofill_data %}]' />
                                <span class="search-navbar"><i class="icon-search"></i></span>
                            </div>
                        </form>
                        
                        <!--<li class="dropdown">
                            <a class="dropdown-toggle" href="#" data-toggle="dropdown">About<b class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li>
                                    <a href="#">Default</a>
                                </li>
                                <li class="divider"></li>
                                <li>
                                    <a href="#">Default</a>
                                </li>
                                <li>
                                    <a href="#">Default</a>
                                </li>
                                <li>
                                    <a href="#">Default</a>
                                </li>
                            </ul>
                        </li>-->
                    </ul>
                    
                        <!--{% block navbar_right %}{% endblock %}-->
                        {% if user.is_authenticated %}
                            <!--
                            <ul class="nav pull-right">
                                <li class="non-link-nav">
                                    <small>Prihlásený ako </small><span class="label label-inverse">{{ user.username }}</span>
                                </li>
                                <li>
                                
                                <li>
                                    <a style="color:orange;" href="{% url create_achievement %}">Vytvoriť</a>
                                </li>
                                
                                <li>
                                    <a href="{% url show_user user_id=user.username %}">Profil<span id="messages" class="badge badge-important" style="margin-left:3px;display:{% if user.userprofile.has_new_messages %}inline{% else %}none{% endif %};">{{ user.userprofile.get_new_messages_count }}</span></a>
                                </li>
                                <li>
                                    <a href="{% url accounts_logout %}">Odhlásiť</a>
                                </li>
                            </ul>
                            -->
                            
                            <ul class="nav pull-right">
                                <li class="dropdown">
                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-white icon-user"></i> {{ user.username }} <span id="messages" class="badge badge-important" style="margin-left:3px;display:{% if user.userprofile.has_new_messages %}inline{% else %}none{% endif %};">{{ user.userprofile.get_new_messages_count }}</span> <i class="icon-chevron-down"></i></a>
                                    <ul class="dropdown-menu">
                                    <li><a style="color:orange;" href="{% url create_achievement %}"><i class="icon-white icon-plus-sign"></i> Vytvoriť achievement</a></li>
                                    <li><a href="{% url show_user user_id=user.username %}"><i class="icon-white icon-user"></i> Profil <span class="badge badge-important message_tag" style="margin-left:3px;display:{% if user.userprofile.has_new_messages %}inline{% else %}none{% endif %};">{{ user.userprofile.get_new_messages_count }}</span></a></li>
                                    <li class="divider"></li>
                                    <li><a href="{% url accounts_logout %}"><i class="icon-white icon-off"></i> Odhlásiť</a></li>
                                    </ul>
                                </li>
                            </ul>
                            
                        {% else %}
                            <ul class="nav pull-right">
                                <li>
                                    <a href="{% url accounts_login %}"><i class="icon-white icon-user"></i> Prihlásiť</a>
                                </li>
                                <li>
                                    <a href="{% url accounts_register %}"><i class="icon-white icon-star"></i> Registrovať</a>
                                </li>
                            </ul>
                        {% endif %}
                <!--</div>-->
            </div>
            </div>
        </div>
    </div>

    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span12">
                {% block content %}{% endblock %}
            </div>
        </div>
            
        <footer>
            <!--
            <div class="row">
                <hr />
                
                <div class="span8"><p></p></div>
                <div class="span4"><p style="text-align: right;"></p></div>
            </div>
            <div class="row">
                <div class="span12">
                    <p style="text-align: center;"></p>
                    <p style="text-align: center;"></p>
                </div>
            </div>
            -->
            
            <!--<a href="#" onclick="Dajaxice.accounts.refresh_messages(my_callback);"><button class="btn">Ahoj</button></a>-->
        </footer>

    </div>
</body>


</html>
